import React, { Component } from 'react';

import { UpSquareOutlined } from '@ant-design/icons';
const ImgBox = {
    backgroundColor: '#ffffff30',
    width: '40px',
    height: '40px',
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
    position: 'fixed',
    bottom: '70px',
    right: '10px',
    borderRadius: '10px',
    zIndex: '10',
}
const Img = {
    fontSize: '30px',
    color:'#00000030'
}

class TopBox extends Component {
    goBackTop = () => {
        document.body.scrollTop = document.documentElement.scrollTop = 0;
    }
    render() {
        return (
            <div className='TopBox' style={ImgBox} onClick={() => { this.goBackTop() }}>
                <UpSquareOutlined style={Img} />
            </div>
        );
    }
}

export default TopBox;